#version 130

uniform mat4 MVP;
uniform mat4 POS;
uniform vec3 LightDir;

in vec3 Position;
in vec3 Normal;
in vec2 Texture;

out vec2 TexCoord;
out float Light;

void main()
{	
	gl_Position = MVP * vec4(Position, 1.0);
	vec4 PrNormal = POS * vec4(Normal, 0.0); 
	Light = dot( normalize(vec4(LightDir, 0.0)), normalize(PrNormal) );
	TexCoord = Texture;
}